from search import search
from build import build

print("欢迎使用联行号系统")


def show_menu():
    print("1", "查询联行号")
    print("2", "重建索引")
    print("q", "退出")


show_menu()

while True:
    menu = input("请输入菜单：")
    if menu == 'q' or menu == 'Q':
        break
    elif menu == '1':
        search()
        show_menu()
    elif menu == '2':
        build()
        show_menu()
    else:
        print("菜单不正确")

print("退出成功")
